//
//  YZMSaleTradeModel.h
//  YZMicroStock
//
//  Created by wangminhong on 16/4/14.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "Mantle.h"

typedef NS_ENUM(NSInteger, YZMSaleTradeStaus) {
    
    YZMSaleTradeStausForMatching = 1,/*匹配中*/
    YZMSaleTradeStausForMatched = 2,/*待交易*/
    YZMSaleTradeStausForTrading = 3,/*交易中*/
    YZMSaleTradeStausForHolding = 4,/*持仓中*/
    YZMSaleTradeStausForToClose = 5,/*待平仓*/
    YZMSaleTradeStausForClosing = 6,/*平仓中*/
    YZMSaleTradeStausForDating = 7,/*清算中*/
    YZMSaleTradeStausForDated = 8,/*已清算*/
    YZMSaleTradeStausForMisbirth = 9,/*已流单*/
    YZMSaleTradeStausForCancel = 10,/*已撤销*/
    
};

@interface YZMSaleTradeModelForApart : MTLModel<MTLJSONSerializing>

@property (nonatomic, assign) double amount;//成交数量
@property (nonatomic, assign) double price;//成交价格
@property (nonatomic, strong) NSDate *time;//成交时间

@end

@interface YZMSaleTradeModel : MTLModel<MTLJSONSerializing>

@property (nonatomic, assign) double buyMoney;//交易金额
@property (nonatomic, assign) double principal;//保证金
@property (nonatomic, assign) double buyPriceDeal;//成本价
@property (nonatomic, assign) double sellPriceDeal;//卖出价
@property (nonatomic, strong) NSDate *dealTime;//成交时间
@property (nonatomic, assign) long long tid;//交易号
@property (nonatomic, assign) double quitLoss;//止损
@property (nonatomic, assign) YZMSaleTradeStaus status;//状态
@property (nonatomic, strong) NSString *stockCode;//股票代码
@property (nonatomic, strong) NSString *stockName;//股票名称
@property (nonatomic, assign) NSInteger holdCount;//持仓量
@property (nonatomic, assign) NSInteger sumCount;//原持仓
@property (nonatomic, assign) double owedMoney;//欠费金额
@property (nonatomic, strong) NSArray *tradingList;//部分成交列表

@property (nonatomic, assign) double tradingDeferCharge;//总递延费
@property (nonatomic, assign) double unHanldHoldDeferCharge;//逾期费用
@property (nonatomic, assign) NSInteger holdDays;//持仓时间
@property (nonatomic, assign) double deferProfit;//递延条件的浮动盈亏数值
@property(nonatomic, assign) double lossPrincipal;

@property (nonatomic, assign) NSInteger apartCount;/*部分成交数量*/
@property(nonatomic, assign) NSInteger schemeId;


@end
